<%@ page language="java" 
import="java.util.*"
import="javax.imageio.*"
import="java.util.*"
import="javax.xml.*"
import="javax.xml.parsers.*"
import="org.w3c.dom.*"
import="javax.xml.transform.*"
import="javax.xml.transform.dom.*"
import="javax.xml.transform.stream.*" 
import="java.io.StringReader" 
import="java.lang.Integer"
import="org.xml.sax.InputSource"
import="webxml.*"
import="javax.servlet.*" 
import="java.net.URLEncoder"
import="java.io.StringWriter"
import="javax.xml.transform.Transformer"
import="java.io.ByteArrayOutputStream"
pageEncoding="UTF-8"

%><%!  
	
	
	
	
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'showxml.jsp' starting page</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  
  <body>

    <%
    			String xmlfile = "<?xml version=\"1.0\"?><root><vvv><a1>111</a1><a2>222</a2><a3>333</a3></vvv><a>111</a><vvv><a1>444</a1><a2>555</a2><a3>666</a3></vvv><a>bbb</a></root>";
 				DocumentBuilderFactory factory = DocumentBuilderFactory
						.newInstance();
				DocumentBuilder builder = factory.newDocumentBuilder();
				Document document = builder.parse(new InputSource(
						new StringReader(xmlfile)));
				
				//NodeList nodeLists = document.getElementsByTagName("a");
    			//out.print(nodelist_tostring(nodeLists));
    			
    			NodeList nodeLists2 = document.getElementsByTagName("vvv");
    			//out.print(nodelist_tostring(nodeLists2));
    			
     %>
  </body>
</html>
